package main

import (
	"encoding/json"
	"fmt"
	"io/ioutil"
)

func main() {
	s := map[int]string{1: "111", 2: "222", 3: "333"}
	data, _ := json.Marshal(s)

	myFilePath := "/Users/kunhaozhao/go/baim0.xyz/go_learning/day05/04 字符串的存储原理/data.json"

	ioutil.WriteFile(myFilePath, data, 0666)
	res, _ := ioutil.ReadFile(myFilePath)
	var info map[string]string
	json.Unmarshal([]byte(res), &info)
	fmt.Println(info)
}
